import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import index from '@/components/index'
import find from '@/components/find'
import set from '@/components/set'
import person from '@/components/person'
import address from '@/components/address'
import detail from '@/components/detail'
import silder from '@/components/silder'
import main from '@/components/main'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
        path:'/index',
        name:'index',
        components:{
            silder:silder,
            main:main
        }
    },
    {
        path:'/find',
        component:find
    },
    {
        path:'/set',
        name:'set',
        component:set,
        children:[
            {
                path:'/set/person',
                component:person
            },
            {
                path:'/set/address',
                component:address
            }
        ]
    },
    {
        path:'/detail',
        name:'detail',
        component:detail
    }
  ]
})
